package modelo.memento;

import java.util.ArrayList;

public class Caretaker {
        private ArrayList<Memento>savedStates = new ArrayList<Memento>();
        
        public void addMemento(Memento m) {
        	savedStates.add(m);
        }
        
        public int getUltimo()
        {
                return savedStates.size()-1;
        }
        public Memento getMemento(int index){
                Memento rec = savedStates.get(index);
                savedStates.remove(index);
                return rec;
        }
}
